package top.lixunda.books3.dao;

import org.apache.ibatis.annotations.Param;
import top.lixunda.books3.entity.Book;
import top.lixunda.books3.entity.BookGoods;
import top.lixunda.books3.entity.BookGoodsExample;
import top.lixunda.books3.model.SimpleGoods;

import java.util.List;

public interface BookGoodsMapper {
    long countByExample(BookGoodsExample example);

    int deleteByExample(BookGoodsExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BookGoods record);

    int insertSelective(BookGoods record);

    List<BookGoods> selectByExampleWithBLOBs(BookGoodsExample example);

    List<BookGoods> selectByExample(BookGoodsExample example);

    BookGoods selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BookGoods record, @Param("example") BookGoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") BookGoods record, @Param("example") BookGoodsExample example);

    int updateByExample(@Param("record") BookGoods record, @Param("example") BookGoodsExample example);

    int updateByPrimaryKeySelective(BookGoods record);

    int updateByPrimaryKeyWithBLOBs(BookGoods record);

    int updateByPrimaryKey(BookGoods record);

    long getAbleGoodsCountByBook(@Param("id") long id);

    List<SimpleGoods> getAbleGoodsByBook(@Param("id") long id, @Param("start") long start, @Param("count") int count);
}